/*
* Copyright 2024 NXP
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"



void setup_scr_screen_welcome(lv_ui *ui)
{
	//Write codes screen_welcome
	ui->screen_welcome = lv_obj_create(NULL);
	lv_obj_set_size(ui->screen_welcome, 240, 135);
	lv_obj_set_scrollbar_mode(ui->screen_welcome, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen_welcome, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_welcome, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_welcome_cont_1
	ui->screen_welcome_cont_1 = lv_obj_create(ui->screen_welcome);
	lv_obj_set_pos(ui->screen_welcome_cont_1, 0, 0);
	lv_obj_set_size(ui->screen_welcome_cont_1, 240, 135);
	lv_obj_set_scrollbar_mode(ui->screen_welcome_cont_1, LV_SCROLLBAR_MODE_OFF);

	//Write style for screen_welcome_cont_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_border_width(ui->screen_welcome_cont_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_opa(ui->screen_welcome_cont_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_color(ui->screen_welcome_cont_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_side(ui->screen_welcome_cont_1, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_welcome_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_opa(ui->screen_welcome_cont_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_welcome_cont_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_welcome_cont_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_top(ui->screen_welcome_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_bottom(ui->screen_welcome_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_left(ui->screen_welcome_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_right(ui->screen_welcome_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_welcome_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_welcome_label_eepw
	ui->screen_welcome_label_eepw = lv_label_create(ui->screen_welcome_cont_1);
	lv_label_set_text(ui->screen_welcome_label_eepw, "EEPW & DigiKey");
	lv_label_set_long_mode(ui->screen_welcome_label_eepw, LV_LABEL_LONG_WRAP);
	lv_obj_set_pos(ui->screen_welcome_label_eepw, 60, 16);
	lv_obj_set_size(ui->screen_welcome_label_eepw, 120, 16);

	//Write style for screen_welcome_label_eepw, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_border_width(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_welcome_label_eepw, lv_color_hex(0xf00000), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_welcome_label_eepw, &lv_font_Acme_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_welcome_label_eepw, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_letter_space(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_line_space(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_welcome_label_eepw, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_opa(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_top(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_right(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_bottom(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_left(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_welcome_label_eepw, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_welcome_label_1
	ui->screen_welcome_label_1 = lv_label_create(ui->screen_welcome_cont_1);
	lv_label_set_text(ui->screen_welcome_label_1, "DIY-S3");
	lv_label_set_long_mode(ui->screen_welcome_label_1, LV_LABEL_LONG_WRAP);
	lv_obj_set_pos(ui->screen_welcome_label_1, 39, 54);
	lv_obj_set_size(ui->screen_welcome_label_1, 50, 16);

	//Write style for screen_welcome_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_border_width(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_welcome_label_1, lv_color_hex(0xf00000), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_welcome_label_1, &lv_font_Acme_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_welcome_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_letter_space(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_line_space(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_welcome_label_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_opa(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_top(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_right(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_bottom(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_left(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_welcome_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_welcome_label_2
	ui->screen_welcome_label_2 = lv_label_create(ui->screen_welcome_cont_1);
	lv_label_set_text(ui->screen_welcome_label_2, "Light Meter");
	lv_label_set_long_mode(ui->screen_welcome_label_2, LV_LABEL_LONG_WRAP);
	lv_obj_set_pos(ui->screen_welcome_label_2, 120, 55);
	lv_obj_set_size(ui->screen_welcome_label_2, 100, 16);

	//Write style for screen_welcome_label_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_border_width(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_welcome_label_2, lv_color_hex(0xf00000), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_welcome_label_2, &lv_font_Acme_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_welcome_label_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_letter_space(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_line_space(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_welcome_label_2, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_opa(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_top(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_right(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_bottom(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_left(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_welcome_label_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_welcome_label_3
	ui->screen_welcome_label_3 = lv_label_create(ui->screen_welcome_cont_1);
	lv_label_set_text(ui->screen_welcome_label_3, "20241203");
	lv_label_set_long_mode(ui->screen_welcome_label_3, LV_LABEL_LONG_WRAP);
	lv_obj_set_pos(ui->screen_welcome_label_3, 39, 89);
	lv_obj_set_size(ui->screen_welcome_label_3, 70, 16);

	//Write style for screen_welcome_label_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_border_width(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_welcome_label_3, lv_color_hex(0xf00000), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_welcome_label_3, &lv_font_Acme_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_welcome_label_3, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_letter_space(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_line_space(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_welcome_label_3, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_opa(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_top(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_right(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_bottom(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_left(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_welcome_label_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_welcome_label_4
	ui->screen_welcome_label_4 = lv_label_create(ui->screen_welcome_cont_1);
	lv_label_set_text(ui->screen_welcome_label_4, "@ CoderX9527");
	lv_label_set_long_mode(ui->screen_welcome_label_4, LV_LABEL_LONG_WRAP);
	lv_obj_set_pos(ui->screen_welcome_label_4, 120, 90);
	lv_obj_set_size(ui->screen_welcome_label_4, 100, 16);

	//Write style for screen_welcome_label_4, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_border_width(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_welcome_label_4, lv_color_hex(0xf00000), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_welcome_label_4, &lv_font_Acme_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_welcome_label_4, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_letter_space(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_line_space(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_welcome_label_4, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_opa(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_top(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_right(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_bottom(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_pad_left(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_welcome_label_4, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write codes screen_welcome_btn_next_scr
	ui->screen_welcome_btn_next_scr = lv_btn_create(ui->screen_welcome);
	ui->screen_welcome_btn_next_scr_label = lv_label_create(ui->screen_welcome_btn_next_scr);
	lv_label_set_text(ui->screen_welcome_btn_next_scr_label, ">");
	lv_label_set_long_mode(ui->screen_welcome_btn_next_scr_label, LV_LABEL_LONG_WRAP);
	lv_obj_align(ui->screen_welcome_btn_next_scr_label, LV_ALIGN_CENTER, 0, 0);
	lv_obj_set_style_pad_all(ui->screen_welcome_btn_next_scr, 0, LV_STATE_DEFAULT);
	lv_obj_set_width(ui->screen_welcome_btn_next_scr_label, LV_PCT(100));
	lv_obj_set_pos(ui->screen_welcome_btn_next_scr, 225, 5);
	lv_obj_set_size(ui->screen_welcome_btn_next_scr, 10, 10);

	//Write style for screen_welcome_btn_next_scr, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
	lv_obj_set_style_bg_opa(ui->screen_welcome_btn_next_scr, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_color(ui->screen_welcome_btn_next_scr, lv_color_hex(0x6fd4fd), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_bg_grad_dir(ui->screen_welcome_btn_next_scr, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_border_width(ui->screen_welcome_btn_next_scr, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_radius(ui->screen_welcome_btn_next_scr, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_shadow_width(ui->screen_welcome_btn_next_scr, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_color(ui->screen_welcome_btn_next_scr, lv_color_hex(0xfdfdfe), LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_font(ui->screen_welcome_btn_next_scr, &lv_font_Acme_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_opa(ui->screen_welcome_btn_next_scr, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
	lv_obj_set_style_text_align(ui->screen_welcome_btn_next_scr, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);

	//Write style for screen_welcome_btn_next_scr, Part: LV_PART_MAIN, State: LV_STATE_FOCUSED.
	lv_obj_set_style_bg_opa(ui->screen_welcome_btn_next_scr, 255, LV_PART_MAIN|LV_STATE_FOCUSED);
	lv_obj_set_style_bg_color(ui->screen_welcome_btn_next_scr, lv_color_hex(0x2FDA64), LV_PART_MAIN|LV_STATE_FOCUSED);
	lv_obj_set_style_bg_grad_dir(ui->screen_welcome_btn_next_scr, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_FOCUSED);
	lv_obj_set_style_border_width(ui->screen_welcome_btn_next_scr, 0, LV_PART_MAIN|LV_STATE_FOCUSED);
	lv_obj_set_style_radius(ui->screen_welcome_btn_next_scr, 5, LV_PART_MAIN|LV_STATE_FOCUSED);
	lv_obj_set_style_shadow_width(ui->screen_welcome_btn_next_scr, 0, LV_PART_MAIN|LV_STATE_FOCUSED);
	lv_obj_set_style_text_color(ui->screen_welcome_btn_next_scr, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_FOCUSED);
	lv_obj_set_style_text_font(ui->screen_welcome_btn_next_scr, &lv_font_montserratMedium_16, LV_PART_MAIN|LV_STATE_FOCUSED);
	lv_obj_set_style_text_opa(ui->screen_welcome_btn_next_scr, 255, LV_PART_MAIN|LV_STATE_FOCUSED);

	//The custom code of screen_welcome.
	

	//Update current screen layout.
	lv_obj_update_layout(ui->screen_welcome);

	//Init events for screen.
	events_init_screen_welcome(ui);
}
